<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>支持的字符编码</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mbstring.http.html">HTTP 输入和输出</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mbstring.overload.html">函数重载功能</a></div>
 <div class="up"><a href="book.mbstring.html">多字节字符串</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mbstring.supported-encodings" class="chapter">
 <h1>支持的字符编码</h1>

 <p class="simpara">
  当前 <em>mbstring</em> 模块支持以下的字符编码。这些字符编码中的任意一个都能指定到 <em>mbstring</em> 函数中的 <em>encoding</em> 参数。
 </p>
 <p class="para">
  该 PHP 扩展支持的字符编码有以下几种：
 </p>
 <ul class="itemizedlist">
  <li class="listitem"><span class="simpara">UCS-4*</span></li>
  <li class="listitem"><span class="simpara">UCS-4BE</span></li>
  <li class="listitem"><span class="simpara">UCS-4LE*</span></li>
  <li class="listitem"><span class="simpara">UCS-2</span></li>
  <li class="listitem"><span class="simpara">UCS-2BE</span></li>
  <li class="listitem"><span class="simpara">UCS-2LE</span></li>
  <li class="listitem"><span class="simpara">UTF-32*</span></li>
  <li class="listitem"><span class="simpara">UTF-32BE*</span></li>
  <li class="listitem"><span class="simpara">UTF-32LE*</span></li>
  <li class="listitem"><span class="simpara">UTF-16*</span></li>
  <li class="listitem"><span class="simpara">UTF-16BE*</span></li>
  <li class="listitem"><span class="simpara">UTF-16LE*</span></li>
  <li class="listitem"><span class="simpara">UTF-7</span></li>
  <li class="listitem"><span class="simpara">UTF7-IMAP</span></li>
  <li class="listitem"><span class="simpara">UTF-8*</span></li>
  <li class="listitem"><span class="simpara">ASCII*</span></li>
  <li class="listitem"><span class="simpara">EUC-JP*</span></li>
  <li class="listitem"><span class="simpara">SJIS*</span></li>
  <li class="listitem"><span class="simpara">eucJP-win*</span></li>
  <li class="listitem"><span class="simpara">SJIS-win*</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-JP</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-JP-MS</span></li>
  <li class="listitem"><span class="simpara">CP932</span></li>
  <li class="listitem"><span class="simpara">CP51932</span></li>
  <li class="listitem"><span class="simpara">SJIS-mac** (别名： MacJapanese)</span></li>
  <li class="listitem"><span class="simpara">SJIS-Mobile#DOCOMO** (别名： SJIS-DOCOMO)</span></li>
  <li class="listitem"><span class="simpara">SJIS-Mobile#KDDI** (别名： SJIS-KDDI)</span></li>
  <li class="listitem"><span class="simpara">SJIS-Mobile#SOFTBANK** (别名： SJIS-SOFTBANK)</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#DOCOMO** (别名： UTF-8-DOCOMO)</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#KDDI-A**</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#KDDI-B** (别名： UTF-8-KDDI)</span></li>
  <li class="listitem"><span class="simpara">UTF-8-Mobile#SOFTBANK** (别名： UTF-8-SOFTBANK)</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-JP-MOBILE#KDDI** (别名： ISO-2022-JP-KDDI)</span></li>
  <li class="listitem"><span class="simpara">JIS</span></li>
  <li class="listitem"><span class="simpara">JIS-ms</span></li>
  <li class="listitem"><span class="simpara">CP50220</span></li>
  <li class="listitem"><span class="simpara">CP50220raw</span></li>
  <li class="listitem"><span class="simpara">CP50221</span></li>
  <li class="listitem"><span class="simpara">CP50222</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-1*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-2*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-3*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-4*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-5*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-6*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-7*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-8*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-9*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-10*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-13*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-14*</span></li>
  <li class="listitem"><span class="simpara">ISO-8859-15*</span></li>
  <li class="listitem"><span class="simpara">byte2be</span></li>
  <li class="listitem"><span class="simpara">byte2le</span></li>
  <li class="listitem"><span class="simpara">byte4be</span></li>
  <li class="listitem"><span class="simpara">byte4le</span></li>
  <li class="listitem"><span class="simpara">BASE64</span></li>
  <li class="listitem"><span class="simpara">HTML-ENTITIES</span></li>
  <li class="listitem"><span class="simpara">7bit</span></li>
  <li class="listitem"><span class="simpara">8bit</span></li>
  <li class="listitem"><span class="simpara">EUC-CN*</span></li>
  <li class="listitem"><span class="simpara">CP936</span></li>
  <li class="listitem"><span class="simpara">GB18030**</span></li>
  <li class="listitem"><span class="simpara">HZ</span></li>
  <li class="listitem"><span class="simpara">EUC-TW*</span></li>
  <li class="listitem"><span class="simpara">CP950</span></li>
  <li class="listitem"><span class="simpara">BIG-5*</span></li>
  <li class="listitem"><span class="simpara">EUC-KR*</span></li>
  <li class="listitem"><span class="simpara">UHC (CP949)</span></li>
  <li class="listitem"><span class="simpara">ISO-2022-KR</span></li>
  <li class="listitem"><span class="simpara">Windows-1251 (CP1251)</span></li>
  <li class="listitem"><span class="simpara">Windows-1252 (CP1252)</span></li>
  <li class="listitem"><span class="simpara">CP866 (IBM866)</span></li>
  <li class="listitem"><span class="simpara">KOI8-R*</span></li>
 </ul>
 <p class="para">
  * 表示该编码也可以在正则表达式中使用。
 </p>
 <p class="para">
  ** 表示该编码自 PHP 5.4.0 始可用。
 </p>
 <p class="para">
  任何接受编码名称的 <var class="filename">php.ini</var> 条目同样也可以使用 &quot;<em>auto</em>&quot; 和 &quot;<em>pass</em>&quot; 的值。
  接受编码名的 <em>mbstring</em> 函数同样也可以使用值 &quot;<em>auto</em>&quot;。
 </p>
 <p class="para">
  如果设置了 &quot;<em>pass</em>&quot;，将不会对字符的编码进行转化。
 </p>
 <p class="para">
  如果设置了 &quot;<em>auto</em>&quot;，它将扩展成 <a href="mbstring.configuration.html" class="link">NLS</a> 中定义的每个字符编码列表。
  比如，假设 NLS 设置为 <em>Japanese</em>，值将会认为是 &quot;<em>ASCII,JIS,UTF-8,EUC-JP,SJIS</em>&quot;。
 </p>
 <p class="para">
  参见 <span class="function"><a href="function.mb-detect-order.html" class="function">mb_detect_order()</a></span>
 </p>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mbstring.http.html">HTTP 输入和输出</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mbstring.overload.html">函数重载功能</a></div>
 <div class="up"><a href="book.mbstring.html">多字节字符串</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
